package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;

@Mapper
public interface UserMapper {
    /**
     *根据openid查找用户
     */
     User getUserByOpenId(String openid);

    /**
     * 添加用户
     * @param user
     */
    void add(User user);

    /**
     * 根据id查找
     * @param userId
     * @return
     */
    User getById(Long userId);

    /**
     * 根据日期统计用户数量
     * @param beginTime
     * @param endTime
     * @return
     */
    int getUserBydate(LocalDateTime beginTime, LocalDateTime endTime);
}
